const routers = [
    // 默认路由
    {
        path: '/',
        meta: {
            title: '物流系统'
        },
        component: (resolve) => require(['./views/login.vue'], resolve)
    },
    //登陆路由
    {
        path: '/login',
        meta: {
            title: '登录'
        },
        component: (resolve) => require(['./views/login.vue'], resolve)
    },
    {
        path: '/printSF/:shippingId',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
            title: '顺丰快递'
        },
        component: (resolve) => require(['./views/print/printSF.vue'], resolve)
    },
    {
        path: '/printEMS/:shippingId',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
            title: 'EMS快递'
        },
        component: (resolve) => require(['./views/print/printEMS.vue'], resolve)
    },
    {
        path: '/printUPS/:shippingId',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
            title: 'UPS快递'
        },
        component: (resolve) => require(['./views/print/printUPS.vue'], resolve)
    },{
        path: '/printDHL/:shippingId',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
            title: 'DHL快递'
        },
        component: (resolve) => require(['./views/print/printDHL.vue'], resolve)
    },
    {
        path: '/printTJSC/:gyxxglid',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
            title: '打印'
        },
        component: (resolve) => require(['./views/print/printTJSC.vue'], resolve)
    },

    //主页路由
    {
        path: '/index',
        meta: {
            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
            title: 'index'
        },
        component: (resolve) => require(['./views/index.vue'], resolve),
        children: [
            { path: '',
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                    title: 'index'
                },
            component: resolve => require(['./views/home.vue'], resolve)},
            //首页路由
            { path: '/home',
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                    title: 'index'
                },
                component: resolve => require(['./views/home.vue'], resolve)},
            //业务中心路由
            { path: '/business',
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                    title: '业务中心'
                },
                component: resolve => require(['./views/business.vue'], resolve),
                children: [
                    { path: '',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '线扣操作'
                        },
                        component: resolve => require(['./views/business/flpt.vue'], resolve)},
                    { path: '/business/flpt',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '线扣操作'
                        },
                        component: resolve => require(['./views/business/flpt.vue'], resolve)},
                    { path: '/business/cylz',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '衬衣领子'
                        },
                        component: resolve => require(['./views/business/cylz.vue'], resolve)},
                    { path: '/business/ddcx',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '订单撤销'
                        },
                        component: resolve => require(['./views/business/ddcx.vue'], resolve)},
                    { path: '/business/fxddsh',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '返修审核'
                        },
                        component: resolve => require(['./views/business/fxddsh.vue'], resolve)},
                    { path: '/business/ddtz',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '订单停滞'
                        },
                        component: resolve => require(['./views/business/ddtz.vue'], resolve)},
                    { path: '/business/syfk',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '试衣反馈'
                        },
                        component: resolve => require(['./views/business/syfk.vue'], resolve)},
                    { path: '/business/tjsc',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '提交生产'
                        },
                        component: resolve => require(['./views/business/tjsc.vue'], resolve)},
                    { path: '/business/ltdnListPage',//量体师
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '量体师'
                        },
                        component: resolve => require(['./views/business/ltdnListPage.vue'], resolve)}
                ]
            },
            //物流中心路由
            { path: '/logistics',
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                    title: '物流中心'
                },
                component: resolve => require(['./views/logistics.vue'], resolve),
                children: [
                    { path: '',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '物流配送'
                        },
                        component: resolve => require(['./views/logistics/logistic.vue'], resolve)},
                    { path: '/logistics/logistic',//物流中心
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '物流配送'
                        },
                        component: resolve => require(['./views/logistics/logistic.vue'], resolve)},
                    { path: '/logistics/cusArchive',//客户档案
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '客户档案'
                        },
                        component: resolve => require(['./views/logistics/cusArchive.vue'], resolve)},
                    { path: '/logistics/systemContrast',//系统对照
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '系统对照'
                        },
                        component: resolve => require(['./views/logistics/systemContrast.vue'], resolve)},
                    { path: '/logistics/invoice',//发票管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '发票管理'
                        },
                        component: resolve => require(['./views/logistics/invoice.vue'], resolve)},
                    { path: '/logistics/express',//快递公司
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '快递公司'
                        },
                        component: resolve => require(['./views/logistics/express.vue'], resolve)},
                    { path: '/logistics/otherorders',//其他订单
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '其他订单'
                        },
                        component: resolve => require(['./views/logistics/otherorders.vue'], resolve)}
                ]
            },
            //报文管理路由
            { path: '/message',
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                    title: '跨境电商'
                },
                component: resolve => require(['./views/message.vue'], resolve),
                children: [
                    { path: '',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '订单管理'
                        },
                        component: resolve => require(['./views/message/order.vue'], resolve)},
                    { path: '/message/order',//订单管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '订单管理'
                        },
                        component: resolve => require(['./views/message/order.vue'], resolve)},
                    { path: '/message/billlistPage',//运单管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '运单管理'
                        },
                        component: resolve => require(['./views/message/billlistPage.vue'], resolve)},
                    { path: '/message/declForm',//清单管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '清单管理'
                        },
                        component: resolve => require(['./views/message/declForm.vue'], resolve)}
                ]
            },
            //TMW管理路由
            { path: '/TMWManagement',
                meta: {
                    requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                    title: 'TMW管理'
                },
                component: resolve => require(['./views/TMWManagement.vue'], resolve),
                children: [
                    { path: '',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: 'ASN管理'
                        },
                        component: resolve => require(['./views/TMWManagement/ASN.vue'], resolve)},
                    { path: '/TMWManagement/ASN',//ASN管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: 'ASN管理'
                        },
                        component: resolve => require(['./views/TMWManagement/ASN.vue'], resolve)},
                    { path: '/TMWManagement/EDI',//EDI管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: 'EDI管理'
                        },
                        component: resolve => require(['./views/TMWManagement/EDI.vue'], resolve)}
                ]
            },
            //系统设置路由
            { path: '/system',
                component: resolve => require(['./views/system.vue'], resolve),
                children: [
                    { path: '',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '日志管理'
                        },
                        component: resolve => require(['./views/system/log.vue'], resolve)},
                    { path: '/system/log',//日志管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '日志管理'
                        },
                        component: resolve => require(['./views/system/log.vue'], resolve)}
                ]
            },
            //用户管理路由
            { path: '/bspp',
                component: resolve => require(['./views/bspp.vue'], resolve),
                children: [
                    { path: '',
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '用户管理'
                        },
                        component: resolve => require(['./views/bspp/userListPage.vue'], resolve)},
                    { path: '/bspp/userListPage',//用户管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '用户管理'
                        },
                        component: resolve => require(['./views/bspp/userListPage.vue'], resolve)},
                    { path: '/bspp/privilegeManagement',//权限管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '权限管理'
                        },
                        component: resolve => require(['./views/bspp/privilegeManagement.vue'], resolve)},
                    { path: '/bspp/roleManagement',//角色管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '角色管理'
                        },
                        component: resolve => require(['./views/bspp/roleManagement.vue'], resolve)},
                    { path: '/bspp/menuManagement',//菜单管理
                        meta: {
                            requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
                            title: '菜单管理'
                        },
                        component: resolve => require(['./views/bspp/menuManagement.vue'], resolve)}
                ]
            }

        ]
    }


];
export default routers;